package com.yzh.oop3;

/**
 * @author 于振晗
 * @title: Person
 * @description: TODO Person
 * @date 2020年08月28日
 * @path com.yzh.oop3
 */
public class Person implements  Comparable{
    private String name;
    private int age;
    public Person(String name, int age) {
        this.name = name;
        this.age = age;
    }

    @Override
    public int compareTo(Object obj) {
        Person other = (Person)obj;
        return this.age - other.age ;
    }
}